#!/bin/sh

#CURRENT_PWD=`pwd`
CURRENT_PWD=$(cd "$(dirname "$0")";pwd)

#CURRENT_USER=`env | grep USER= | sed 's/=/\n/g'|sed '1d'`
#if [ $CURRENT_USER -eq 'root' ];then
#	CURRENT_HOME='/root';
#else
#	CURRENT_HOME="/home/${CURRENT_USER}";
#fi

echo $CURRENT_PWD
# echo $CURRENT_HOME

# 更新用户的时间戳而不执行命令
sudo -v

# image
sudo cp $CURRENT_PWD/../res/CommMaster.png /usr/share/icons/CommMaster.png

# gnome start menu 
sudo cp $CURRENT_PWD/../res/CommMaster.desktop /usr/share/applications
sudo cp $CURRENT_PWD/../res/commmaster.menu /etc/xdg/menus/applications-merged/

sudo rm -rf $CURRENT_PWD/../install
